package uvt.map.graph;

import java.awt.Color;

import uvt.map.JMapViewer;
import uvt.map.graph.interfaces.FromWithOnToElement;
import uvt.map.mapmarker.MapMarkerDot;

public class FromWithOnTo implements Drawable,FromWithOnToElement {
	
	private Node from;
	private Vertex withAndOn;
	private Node to;
	
	public FromWithOnTo() {
		this.from = null;
		this.withAndOn = null;
		this.to = null;
	}
	
	public FromWithOnTo(Node from,Vertex withAndOn,Node to) {
		this.from = from;
		this.withAndOn = withAndOn;
		this.to = to;
	}

	public Node getFrom() {
		return from;
	}

	public void setFrom(Node from) {
		this.from = from;
	}

	public Vertex getWithAndOn() {
		return withAndOn;
	}

	public void setWithAndOn(Vertex withAndOn) {
		this.withAndOn = withAndOn;
	}

	public Node getTo() {
		return to;
	}

	public void setTo(Node to) {
		this.to = to;
	}
	
	public void draw(JMapViewer map) {
        MapMarkerDot.setDotColor(Color.white);
		from.draw(map);
		withAndOn.draw(map);		
		MapMarkerDot.setDotColor(Color.white);
		to.draw(map);
	}
	
	public String getStationFromName() {
		return from.getName();
	}
	
	public String getStationToName() {
		return to.getName();
	}
	
	public String getStreetName() {
		return withAndOn.getStreet().getName();
	}
	
	public String getRouteName() {
		return withAndOn.getWith().getRoute();
	}
	
	public String getVehicleType() {
		return withAndOn.getWith().getType();
	}

}
